﻿<!DOCTYPE html>
<!-- 
| - - Motion.Euzo.Ca - - - Motion and M+ from euzo.ca - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
-->
<html>
<head>
    <title>Motion Html Editor</title>
    <!-- 
    Application and page settings.
    -->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- 
    Style sheets. 
    -->
    <link href="/Motion/User Interface/Fonts/Fonts.css" rel="stylesheet" type="text/css" />    
    <link href="../../../Motion/User Interface/Framework/Html Editor/Html Editor.css" rel="stylesheet" type="text/css" />
    <!--  
    Application scripts.    
    -->
    <script src="../../../Motion/User Interface/Framework/Html Editor/Html Editor.js" type="text/javascript"></script>
</head>
<body>
    <p>
        Testing the html editor:</p>
    <HtmlEditor style="width: 1000px; height: 500px" content="../../../_Test/Test Page for the Html Editor.html"></HtmlEditor>
    
    <script>
        var CodeFrame = document.createElement("IFRAME");
        CodeFrame.src = "../../../_Test/Test Page for the Html Editor.html";
        CodeFrame.sandbox = "allow-same-origin";
        CodeFrame.style.width = "0px";
        CodeFrame.style.height = "0px";
        CodeFrame.style.border = "0px";
        CodeFrame.style.overflow = "hidden";
        document.body.appendChild(CodeFrame);
        CodeFrame.onload = abc;

        function abc(eventx)
        {
            DisplayTree(eventx.target.contentDocument)
        }

        function DisplayTree(ParentNode)
        {
            if (ParentNode.firstChild)
            {
                console.log(ParentNode.firstChild.nodeName);
                DisplayTree(ParentNode.firstChild);
            }

            if (ParentNode.nextSibling)
            {
                console.log(ParentNode.nextSibling.nodeName);
                DisplayTree(ParentNode.nextSibling);
            }            
        }
    </script>
</body>
</html>
